/*
 * Copyright 2020 The Kubernetes Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Window dressings for the "Show deployment.yaml" bits; see Input.tsx
 * for the component implementation.
 *
 */

@import '_mixins';
@import '../Sidecar/_mixins';
@import '../common/_narrow-window';
@import '../ExpandableSection/_mixins';

@mixin Editor {
  .kui--source-ref-editor {
    @content;
  }
  .monaco-editor {
    @content;
  }
}

@mixin FullWidthEditor {
  @include Editor {
    width: 100%;
    min-width: unset;
  }
}

@include Editor {
  min-width: 40rem;
  max-width: 100%;
}

@include Scrollback {
  @include SampleOutput {
    @include ExpandableSectionToggle {
      background-color: transparent;

      &:focus {
        outline: none;
      }
    }

    @include ExpandableSectionButtonIcon {
      color: var(--color-text-02);
      width: 1.25rem; /* avoids some odd Focus outline rendering */
    }

    @include ExpandableSectionContent {
      margin-top: 0;
    }
  }
}

@include Editor {
  height: 20rem;
}
@include narrow-window {
  @include FullWidthEditor;
}
